<!--
 * @Author: 码上talk|RC
 * @Date: 2020-09-29 16:06:55
 * @LastEditTime: 2021-01-07 15:41:27
 * @LastEditors: 码上talk|RC
 * @Description: 
 * @FilePath: /tacomall-merchant/src/pages/order/info.vue
 * @微信:  13680065830
 * @邮箱:  3189482282@qq.com
 * @oops: Just do what I think it is right
-->
<template>
    <div class="order-info">
        <div class="oi-section oi-base">
            <div class="os-title">
                <span>订单概要</span>
            </div>
            <div class="os-content">
                <div class="ob-wrap">
                    <div class="ow-left">
                        <table>
                            <tbody>
                                <tr>
                                    <td>
                                        <span>订单编号：</span>
                                        <span>QSDFF093275JCS</span>
                                    </td>
                                    <td>
                                        <span>支付方式：</span>
                                        <span>微信支付</span>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <span>收货地址：</span>
                                        <span>广东省广州市白云区白云机场 16607856352</span>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="ow-right">
                        <div class="r-btns">
                            <div class="b-sub">
                                <i-button-group>
                                    <i-button>无效</i-button>
                                    <i-button>退货</i-button>
                                    <i-button>已完成</i-button>
                                </i-button-group>
                            </div>
                            <div class="b-main">
                                <i-button type="primary">发货</i-button>
                            </div>
                        </div>
                        <div class="r-info">
                            <div class="ri-item">
                                <div class="key">
                                    <span>状态</span>
                                </div>
                                <div class="value">
                                    <span>待发货</span>
                                </div>
                            </div>
                            <div class="ri-item">
                                <div class="key">
                                    <span>金额</span>
                                </div>
                                <div class="value">
                                    <span>￥5430.00</span>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="oi-section oi-progress">
            <div class="os-title">
                <span>订单进度</span>
            </div>
            <div class="os-content">
                <div class="op-step">
                    <i-steps :current="1">
                        <i-step title="用户下单"></i-step>
                        <i-step title="待支付"></i-step>
                        <i-step title="待发货"></i-step>
                        <i-step title="运输中"></i-step>
                        <i-step title="已完成"></i-step>
                    </i-steps>
                </div>
                <div class="op-info">
                    <div class="title">
                        <span>等待用户支付订单：</span>
                    </div>
                    <div class="content">
                        <p>订单编号：QSDFF093275JCS</p>
                        <p>支付编号：2021010712341287364</p>
                        <p>支付金额：￥5430.00</p>
                    </div>
                </div>
            </div>
        </div>
        <div class="oi-section oi-member">
            <div class="os-title">
                <span>用户信息</span>
            </div>
            <div class="os-content">
                <table>
                    <tbody>
                        <tr>
                            <td>
                                <span>用户姓名：</span>
                                <span>付小小</span>
                            </td>
                            <td>
                                <span>会员卡号：</span>
                                <span>32943898021309809423</span>
                            </td>
                            <td>
                                <span>积分等级：</span>
                                <span>5级</span>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <span>联系方式：</span>
                                <span>18112345678</span>
                            </td>
                            <td>
                                <span>联系地址：</span>
                                <span>曲丽丽 18100000000 浙江省杭州市西湖区黄姑山路工专路交叉路口</span>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
        <div class="oi-section oi-spec">
            <div class="os-title">
                <span>商品信息</span>
            </div>
            <div class="os-content">
                <i-table :columns="columns" :data="tableData">
                    <template slot-scope="{ row }" slot="cover">
                        <div class="table-cover">
                            <img-video-previewer :src="row.cover"></img-video-previewer>
                        </div>
                    </template>
                </i-table>
            </div>
        </div>
        <div class="oi-section oi-logistics">
            <div class="os-title">
                <span>物流信息</span>
            </div>
            <div class="os-content"></div>
        </div>
    </div>
</template>

<script>
/* eslint-disable */
import { Order } from '@/model/order'
import imgVideoPreviewer from '@/components/img-video-previewer'
export default {
    components: {
        imgVideoPreviewer
    },
    data() {
        return {
            params: this.$route.query,
            goods: new Order(),
            columns: [
                {
                    title: '商品名称',
                    key: 'name'
                },
                {
                    title: '商品图片',
                    slot: 'cover',
                    width: 200
                },
                {
                    title: '属性',
                    key: 'attr'
                },
                {
                    title: '价格',
                    key: 'amount'
                },
                {
                    title: '数量',
                    key: 'quantity'
                }
            ]
        }
    },
    computed: {
        tableData() {
            return []
        }
    },
    methods: {
        init() {
            Order.API('info', { params: { id: this.params['id'] }, data: {} }).then(res => {
                const { data } = res
                this.order = new Order(data)
            })
        },
    },
    created() {
        this.init()
    }
}
</script>

<style lang="less">
.order-info {
    .oi-section {
        padding: 10px;
        background: white;
        .os-title {
            display: flex;
            align-items: center;
            height: 60px;
            border-bottom: 1px solid #f7f7f7;
            span {
                font-size: 16px;
                color: #000;
            }
        }
        .os-content {
            padding: 20px 0;
        }
        &:not(:first-child) {
            margin-top: 20px;
        }
    }
    .oi-base {
        .ob-wrap {
            display: flex;
            .ow-left {
                flex: 1;
                table {
                    width: 100%;
                    tbody {
                        tr {
                            &:not(:last-child) {
                                td {
                                    padding-bottom: 16px;
                                }
                            }
                        }
                    }
                }
            }
            .ow-right {
                display: flex;
                flex-direction: column;
                align-items: flex-end;
                width: 400px;
                .r-btns {
                    display: flex;
                    .b-sub {
                    }
                    .b-main {
                        margin-left: 10px;
                    }
                }
                .r-info {
                    display: flex;
                    margin-top: 20px;
                    .ri-item {
                        display: flex;
                        flex-direction: column;
                        align-items: flex-end;
                        .key {
                            span {
                                color: rgba(0, 0, 0, 0.45);
                            }
                        }
                        .value {
                            margin-top: 10px;
                            span {
                                font-size: 24px;
                                color: rgba(0, 0, 0, 0.85);
                            }
                        }
                        &:not(:first-child) {
                            margin-left: 30px;
                        }
                    }
                }
            }
        }
    }
    .oi-progress {
        .op-step {
            width: 70%;
            padding: 20px 0;
            margin: 0 auto;
        }
        .op-info {
            width: 70%;
            padding: 30px;
            margin: 0 auto;
            background: #fafafa;
            .title {
                span {
                    color: rgba(0, 0, 0, 0.85);
                    font-weight: 500;
                    font-size: 16px;
                }
            }
            .content {
                padding: 10px 0;
                p {
                    &:not(:first-child) {
                        margin-top: 10px;
                    }
                }
            }
        }
    }
    .oi-member {
        table {
            width: 100%;
            tbody {
                tr {
                    &:not(:last-child) {
                        td {
                            padding-bottom: 16px;
                        }
                    }
                }
            }
        }
    }
}
</style>